/*******************************************************************************
 * Copyright (c) 2014 Greg Marut.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *    Greg Marut - initial API and implementation
 ******************************************************************************/
package com.gregmarut.util;

public class PrimitiveByteArray extends ByteArray
{
	public static final int INTEGER_BYTES = (Integer.SIZE / Byte.SIZE);
	
	/**
	 * The constructor for PrimitiveByteArray
	 * 
	 * @param intInput
	 */
	public PrimitiveByteArray(int intValue)
	{
		super(INTEGER_BYTES);
		
		// for every byte
		for (int i = 0; i < INTEGER_BYTES; i++)
		{
			// assign the array of bytes
			aryBytes[i] = (byte) (intValue >> (((INTEGER_BYTES - 1) - i) * Byte.SIZE));
		}
	}
}
